package com.yunxiao.hfs.live.activity;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;

import com.yunxiao.hfs.live.contract.LiveContract;
import com.yunxiao.hfs.live.fragment.LiveSub1Fragment;
import com.yunxiao.hfs.live.fragment.LiveSub2Fragment;
import com.yunxiao.hfs.live.presenter.LivePresenter;
import com.yunxiao.hfs.live.task.TaskProvider;

/**
 * Created by huangshengsen on 2017/8/17.
 */

public class LiveActivity extends AppCompatActivity implements LiveContract.View {

    private LiveContract.Presenter mPresenter;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        mPresenter = new LivePresenter(this, TaskProvider.provideLiveTask());

        LiveSub1Fragment liveSub1Fragment = LiveSub1Fragment.newInstance();
        LiveSub2Fragment liveSub2Fragment = LiveSub2Fragment.newInstance();

        mPresenter.setSub1View(liveSub1Fragment);
        mPresenter.setSub2View(liveSub2Fragment);
    }

    @Override
    public void onGetSomething(String something) {
    }
}
